package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.AccessEntity;
import com.sgb.kjwl.model.entity.ComPanyServiceEntity;
import com.sgb.kjwl.model.entity.ProListEntity;
import com.sgb.kjwl.model.entity.business.ApprovalFlowEntity;
import com.sgb.kjwl.model.entity.business.CarEntity;
import com.sgb.kjwl.model.entity.business.CostTypeListEntity;
import com.sgb.kjwl.model.entity.business.CreateMemberEntity;
import com.sgb.kjwl.model.entity.business.DepartNameEntity;
import com.sgb.kjwl.model.entity.business.MemberDetailEntity;
import com.sgb.kjwl.model.entity.business.MemberEntity;
import com.sgb.kjwl.model.entity.business.MemberInfoEntity;
import com.sgb.kjwl.model.entity.business.StorageManEntity;
import com.sgb.kjwl.model.entity.businessmanagement.CompanyEntity;
import com.sgb.kjwl.model.entity.manage.WebsiteInfoEntity;
import com.sgb.kjwl.model.entity.user.UnitEntity;
import com.sgb.link.entity.PickFilterEntity;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.entity.ListResponse;
import com.swgk.core.base.model.factory.BaseUrlInterceptor;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * 企业管理接口
 */
@Deprecated
public interface BusinessManagementAPI {
    //判断已登录账号是否已经关联企业（如未关联则只显示行政人事管理和财务）
    @POST("v1/app/management/isAllowAccessManagement")
    Call<BaseEntity<AccessEntity>> isAllowAccess();

    //通讯录(按部门显示)
    @POST("v1/app/management/addressList")
    Call<BaseEntity<CompanyEntity>> addressList();

    //获取外出审批流
    @POST("v1/app/audit/getOutApproverList")
    Call<BaseEntity<ApprovalFlowEntity>> getApprovalFlow();

    //车辆列表
    @POST("v1/app/management/carList")
    Call<BaseEntity<List<CarEntity>>> getCarList();

    //车辆申请保存接口
    @POST("v1/app/management/saveCarInfo")
    Call<BaseEntity> saveCarInfo(@Body CarEntity carEntity);

//    //印章列表
//    @POST("v1/app/management/sealList")
//    Call<BaseEntity<List<SignetEntity>>> getSealList();

//    //印章申请保存接口
//    @POST("v1/app/management/saveSealInfo")
//    Call<BaseEntity> saveSealInfo(@Body SignetEntity signetEntity);

//    //获取公司和经办人
//    @POST("v1/app/management/getCompanyInfo")
//    Call<BaseEntity<SignetEntity>> getSignetCompanyInfo();

    //品牌保存
    @POST("v1/app/management/shop/saveBrand")
    Call<BaseEntity> saveBrand(@Body Map map);

//    //删除品牌
//    @FormUrlEncoded
//    @POST("v1/app/management/shop/deleteBrand")
//    Call<BaseEntity> deleteBrand(@Field("id") String id);

    //仓储列表
    @FormUrlEncoded
    @POST("v1/app/management/shop/getStorageList")
    Call<BaseEntity<ProListEntity<List<StorageManEntity>>>> getStorageList(@Field("pageNum") int pageNum, @Field("pageSize") int pageSize,@Field("companyId") String companyId);

    //仓储保存
    @POST("v1/app/management/shop/saveStorage")
    Call<BaseEntity> saveStorage(@Body StorageManEntity storageManEntity);

    //删除仓储
    @FormUrlEncoded
    @POST("v1/app/management/shop/deleteStorage")
    Call<BaseEntity> deleteStorage(@Field("id") String id);

    //费用类型-列表
    @POST("v1/app/management/business/costTypeList")
    Call<BaseEntity<ListResponse<List<CostTypeListEntity>>>> costTypeList();

    //费用类型-增加
    @POST("v1/app/management/business/addCostType")
    Call<BaseEntity> addCostType(@Body Map map);

    //费用类型-删除
    @FormUrlEncoded
    @POST("v1/app/management/business/deleteCostType")
    Call<BaseEntity> deleteCostType(@Field("id") String id);

    //费用类型-详情
    @FormUrlEncoded
    @POST("v1/app/management/business/costTypeDetail")
    Call<BaseEntity<CostTypeListEntity>> costTypeDetail(@Field("id") String id);

    //会员列表
    @FormUrlEncoded
    @POST("v1/app/management/business/memberList")
    Call<BaseEntity<ProListEntity<List<MemberEntity>>>> getMemberList(@Field("pageNum") int pageNum, @Field("pageSize") int pageSize);

    //新增会员
    @POST("v1/app/management/business/addMember")
    Call<BaseEntity> addMember(@Body CreateMemberEntity createMemberEntity);

    //获取会员审批流
    @POST("v1/app/audit/getMemberApproverList")
    Call<BaseEntity<ApprovalFlowEntity>> getMemberApproverList();

    //企业服务类型
    @POST("v1/app/management/business/companyTypes")
    Call<BaseEntity<List<UnitEntity>>> getCompanyTypes();

    //企业服务类型注册
    @POST("v1/app/user/identification/queryCompanyServiceType")
    Call<BaseEntity<List<ComPanyServiceEntity>>> queryCompanyServiceType();

    //服务类型新
    @Headers({BaseUrlInterceptor.HEADERS_URL_USER, "tokenType:pc"})
    @GET("v1/app/user/identification/getServiceType")
    Call<BaseEntity<List<PickFilterEntity<List<PickFilterEntity>>>>> getNewServiceType(@Query("siteType") int siteType);

    //获取经营模式
    @Headers({BaseUrlInterceptor.HEADERS_URL_USER, "tokenType:pc"})
    @GET("v1/app/site/admin/companyInfo/getBusinessModule")
    Call<BaseEntity<List<WebsiteInfoEntity.ServiceAreaEntity>>> getBusinessModule(@Query("businessType") int businessType);

    //会员等级
    @POST("v1/app/management/business/memberLevels")
    Call<BaseEntity<List<UnitEntity>>> getMemberLevels();

    //费用类型-详情
    @FormUrlEncoded
    @POST("v1/app/management/business/companyList")
    Call<BaseEntity<ProListEntity<List<com.sgb.kjwl.model.entity.business.CompanyEntity>>>> companyList(@Field("name") String name);

    //企业信息
    @FormUrlEncoded
    @POST("v1/app/management/business/memberCompanyInfo")
    Call<BaseEntity<MemberInfoEntity>> getMemberCompanyInfo(@Field("id") String id);

    //企业详情
    @FormUrlEncoded
    @POST("v1/app/management/business/memberCompanyDetail")
    Call<BaseEntity<MemberDetailEntity>> getMemberCompanyDetail(@Field("id") String id);

    //获取部门与申请人
    @POST("v1/app/management/applierInfo")
    Call<BaseEntity<DepartNameEntity>> getApplierInfo();

    //获取请假类型
    @POST("v1/app/management/leaveType")
    Call<BaseEntity<List<UnitEntity>>> getLeaveType();


}